//
//  String+Emoji.swift
//  01-emoji
//
//  Created by  NorthCity on 15/11/12.
//  Copyright © 2015年  NorthCity. All rights reserved.
//

import Foundation
extension NSString{
    var emoji:String{
//        文本扫描器,指定扫描器格式
        let scanner = NSScanner(string: self as String)
//        unicode 值
        var value:UInt32 = 0
        scanner.scanHexInt(&value)
        let char = Character(UnicodeScalar(value))
        return "\(char)"
    }
}